<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div class="box1">ttttttt</div>
  <div class="box">wwwwwwwww</div>
  <script>
    const box = document.querySelector('.box')
    console.dir(box.innerText)
    box.innerText = '<p>hello</p>'

    const box1 = document.querySelector('.box1')
    console.dir(box1.innerHTML)
    box1.innerHTML = '<p>hello1</p>'
  </script>
</body>

</html>